import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(),
  // 映射关系: path -> component
  routes: [
    {
      path: "/",
      redirect: "/home"
    },
    {
      path: "/home",
      component: () => import("@/views/home/home.vue")
    },
    {
      path: "/withdraw",//提现
      component: () => import("@/views/withdraw/withdraw.vue")
    },
    {
      path: "/applyFor",//加入分销商
      component: () => import("@/views/applyFor/applyFor.vue")
    },
    {
      path: "/userCenter",//个人中心
      component: () => import("../views/userCenter/userCenter.vue"),
      meta: {
        hideTabBar: true
      }
    },
    
    {
      path: "/alterUser",//修改资料
      component: () => import("../views/userCenter/alterUser.vue"),
      meta: {
        hideTabBar: true
      }
    },
    {
      path: "/alterPassWord",//修改密码
      component: () => import("../views/userCenter/alterPassWord.vue"),
      meta: {
        hideTabBar: true
      }
    },
    {
      path: "/message",//我的消息
      component: () => import("@/views/message/message.vue"),
      meta: {
        hideTabBar: true
      }
    },
    {
      path: "/messageDetails",//消息详情
      component: () => import("@/views/message/messageDetails.vue"),
      meta: {
        hideTabBar: true
      }
    },
    {//客户推广
      path: "/merchantPromotion",
      component: () => import("@/views/merchantPromotion/merchantPromotion.vue"),
      meta: {
        hideTabBar: true
      }
    },
    {//提现明细
      path: "/withdrawDetails",
      component: () => import("@/views/withdraw/withdrawDetails.vue"),
      meta: {
        hideTabBar: true
      }
    },
    {//订单
      path: "/order",
      component: () => import("@/views/order/order.vue"),
      meta: {
        hideTabBar: true
      }
    },
    {//登录
      path: "/login",
      component: () => import("@/views/login/login.vue"),
      meta: {
        hideTabBar: true
      }
    },
    {//忘记密码
      path: "/fotgotPassword",
      component: () => import("@/views/login/fotgotPassword.vue"),
      meta: {
        hideTabBar: true
      }
    },
    {//分享海报
      path: "/sharePoster",
      component: () => import("@/views/sharePoster/sharePoster.vue"),
      meta: {
        hideTabBar: true
      }
    },
    // {
    //   path: "/search",
    //   component: () => import("@/views/search/search.vue"),
    //   meta: {
    //     hideTabBar: true
    //   }
    // },
    // {
    //   path: "/detail/:id",
    //   component: () => import("@/views/detail/detail.vue")
    // }
  ]
})

export default router
